﻿using DataModels.Enums.Community;
using System.ComponentModel.DataAnnotations;
using Utils;

namespace DataModels.Dto.Community
{
    public class ButlerEvaluationinfo
    {
        /// <summary>
        /// 评价级别
        /// </summary>
        [Required(ErrorMessage = "评价不能为空")]
        public ButlerEvaluationPerformance? Performance { get; set; }

        /// <summary>
        /// 项目UUID
        /// </summary>
        [GeneralRequired]
        public Guid ProjectUUID { get; set; }

        /// <summary>
        /// 评价内容
        /// </summary>
        public string? Comment { get; set; }
        /// <summary>
        /// 管家UUID
        /// </summary>
        public string StewardUUID { get; set; }
        /// <summary>
        /// 房屋uuid
        /// </summary>
        public string HousingBasicUUID { get; set; }
    }

    public class CalculateSatisfactionResponse
    {
        public string UUID { get; set; }
        public string Name { get; set; }
        public string AvatarUrl { get; set; }
        /// <summary>
        /// 总评价数
        /// </summary>
        public int TotalEvaluations { get; set; }

        /// <summary>
        /// 满意评价数
        /// </summary>
        public int SatisfiedCount { get; set; }

        /// <summary>
        /// 不满意评价数
        /// </summary>
        public int DissatisfiedCount { get; set; }

        /// <summary>
        /// 满意度百分比(仅计算满意和不满意)
        /// </summary>
        public decimal SatisfactionRate { get; set; }

    }
}
